using Unity.Netcode;

namespace Since.Netcode
{
	public abstract class INetworkLogic<T> where T : NetworkBehaviour
	{
		protected T owner { get; set; }

		public void SetNetworkBehaviour(T networkBehaviour)
		{
			owner = networkBehaviour;
		}

		#region Unity生命周期
		public virtual void Update()
		{

		}

		public virtual void OnEnable()
		{

		}

		public virtual void OnDisable()
		{

		}

		public virtual void LateUpdate()
		{

		}

		public virtual void FixedUpdate()
		{

		}

		public virtual void OnDestroy()
		{

		}


		public virtual void OnApplicationPause(bool pauseStatus)
		{

		}

		public virtual void OnApplicationQuit()
		{

		}
		#endregion

		#region 网络生命周期
		public virtual void OnNetworkSpawn()
		{

		}

		public virtual void OnNetworkDespawn()
		{

		}

		public virtual void OnGainedOwnership()
		{

		}

		public virtual void OnOwnershipChanged(ulong previous, ulong current)
		{

		}

		public virtual void OnLostOwnership()
		{

		}

		public virtual void OnNetworkObjectParentChanged(NetworkObject parentNetworkObject)
		{

		}

		public virtual void OnReanticipate(double lastRoundTripTime)
		{

		}
		#endregion
	}
}